package commands;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import control.ComponentProvider;
import factory.ComponentInterface;

public class DeleteCommands  extends AbstractHandler {

	@Override
	public Object execute(ExecutionEvent event) {
		ComponentInterface toDel = ComponentProvider.INSTANCE.getSelected();
		if (toDel != null){
			ComponentProvider.INSTANCE.remove(toDel);			
		}		
		return null;
	}
}